<?php

namespace App\Http\Middleware;

use Closure;

class RoleMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next, $role, $hent)
    {
        // if($request->user()->hasRole($role)) {
        //     echo '有这个角色';
        // }
        echo $role . '<br>' . $hent . '<br>';
        return $next($request);
    }
}
